<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>个人中心</title>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/header.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/footer.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/member.css"/>
		<link rel="shortcut icon" href="{{__PUBLIC__}}/Home/images/favicon.ico">
		<script type="text/javascript" src="{{__PUBLIC__}}/Home/js/jquery-1.8.2.min.js"></script>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
		</style>
		<script>
		$(function(){
			//全选
			$('#checkAll').click(function(){
				//找到所有的复选框，添加checked=checked属性
				$('.goods-lists-dy :checkbox').attr('checked','checked');
			})
				//全不选
			$('#checkNo').click(function(){
					//找到所有的checkbox，取消他们的checked属性
				$('.goods-lists-dy :checkbox').removeAttr('checked');
			})
			$(".m-add-dy").click(function(){
					//获取选中的个数
				var box = $("input:checked").length;
				 str = '';
					//循环压入字符串
				for (var i = 0; i < box; i++) {
					str += ',' + $('input:checked').eq(i).val();
				};
					//截取所需的字符串
					str = str.substr(1);
				
			})
			
		})
		</script>
		{{include file="VIEW_PATH/Common/header.php"}}
		<div class="hr-10"></div>
		<div class="head-title-dy">
			<a href="">首页</a>\
			<a href="">我的商城</a> \
			<a href="">我的订单</a>
		</div>
		<div class="hr-10"></div>
		<div class="m-layout">
			<div class="m-left-dy">
				<div class="m-l-title"><a href="">我的商城</a></div>
				<h3><span>我的账户</span></h3>
				<ul class="m-order-dy">
					<li><a href="{{U('User/money')}}"><span>我的余额</span></a></li>
				</ul>
				<h3><span>订单中心</span></h3>
				<ul class="m-order-dy">
					<li><a href="{{U('User/index')}}"><span>我的订单</span><em>{{$num['all']}}</em></a></li>
				</ul>
				<h3><span>个人中心</span></h3>
				<ul class="m-order-dy">
					<li><a href="{{U('User/users')}}"><span>个人信息管理</span></a></li>
					<li><a href="{{U('User/address')}}"><span>收货地址管理</span></a></li>
				</ul>
			</div>
			<div class="m-right-dy">
				<div class="m-header-dy">
					<h3>我的订单</h3>
				</div>
				<div class="myorder-cate-dy">
					<ul>
						<li><a href="{{U('index',array('n'=>1))}}">全部</a></li>
						<li><a href="{{U('index',array('n'=>2))}}">待支付 <span>{{$num['noPay']}}</span></a></li>
						<li><a href="{{U('index',array('n'=>6))}}">已付款 <span>{{$num['pay']}}</span></a></li>
						<li><a href="{{U('index',array('n'=>3))}}">已发货 <span>{{$num['send']}}</span></a></li>
						<li><a href="{{U('index',array('n'=>4))}}">已完成 <span>{{$num['done']}}</span></a></li>
						<li><a href="{{U('index',array('n'=>5))}}">已取消 <span>{{$num['cancle']}}</span></a></li>
					</ul>
				</div>
					<!---------------------------------订单详情-->
				<div class="layout-dy">
					<div class="list-dy">
						<div class="m-control">
							<label for="" class="m-controller">
								<input type="checkbox" name="" id="checkAll" value="" /><span>全选</span>
							</label>
							<?php if(Q('get.n')==2): ?>
								<a href="{{U('Orders/index',array('od'=>'6,12'))}}" class="m-add-dy"><span>合并支付</span></a>
							<?php endif ?>
						</div>
						<div class="good-list-dy">
							<div>
								<table border="0" cellspacing="" cellpadding="" class="table-bt-dy">
									<tr class="title-dy">
										
										<th width="490" height="30">商品</th>
										<th width="113" height="30">单价/元</th>
										<th width="74" height="30">数量</th>
										<th width="113" height="30">实付款/元</th>
										<th width="138" height="30" class="m-state-dy">订单状态及操作</th>
									</tr>
								</table>
							</div>
							<div class="goods-lists-dy">
								<form action="" method="post">
									{{foreach from="$data" value="$v"}}
										<div class="m-online">
											{{if value="$v['status'] eq '未付款'"}}
												<input type="checkbox" name="myorder[]" value="{{$v['oid']}}" checked="checked" />
											{{endif}}
											<span class="time-dy">{{date('Y-m-d H:i:s',$v['time'])}}</span>
											<span>订单号：<a href="{{U('detail',array('oid'=>$v['oid']))}}">{{$v['number']}}</a></span>
											<!-- <span class="m-col-state">审核通过 | 待支付</span> -->
										</div>
										
											<table border="0" cellspacing="" cellpadding="" class="table-2-dy">
										{{foreach from="$v['list']" key="$k" value="$vl"}}
												<tr height="115">
													<td width="490" height="30">
														<div class="good-area-dy">
															<p class="g-img-dy"><a href=""><img src="{{__ROOT__}}/{{$vl['list_view']}}" alt="" /></a></p>
															<p class="g-name-dy"><a href="" name="gname">{{$vl['gname']}}</a></p>
														</div>
													</td>
													<td width="113" height="30"><span name="price">¥ <?php echo $pp =$vl['subtotal']/$vl['quantity'] ?></span></td>
													<td width="74" height="30" class="g-num-dy">
														{{$vl['quantity']}}
													</td>
													<td width="113" height="30" class="g-stotal-dy"><span>¥{{$vl['subtotal']}}</span></td>

													<td width="138" height="30" rowspan="1" class="g-del-dy">
														{{if value="$k eq 0"}}
														<a  {{if value="$v['status'] eq '未付款'"}} href="{{U('Orders/index',array('od'=>$v['oid']))}}" {{endif}} class="m-go-pay">
														<?php if($v['status'] == '未付款'): ?>
															去支付
														<?php else: ?>
															{{$v['status']}}
														<?php endif ?>
														</a>
														{{if value="$v['status'] eq '未付款'"}}
															<a href="{{U('cancle',array('oid'=>$v['oid']))}}">取消订单</a>
														{{endif}}
														<a href="{{U('detail',array('oid'=>$v['oid']))}}">订单详情</a>
														{{else}}
														{{endif}}
													</td>
												</tr>
											{{endforeach}}
											</table>
									{{endforeach}}	
							</div>
						</div>
						<div class="hr-10"></div>
						<div class="hr-10"></div>
						<div class="m-control">
							<label for="" class="m-controller">
								<input type="checkbox" name="" id="checkAll" value="" /><span>全选</span>
							</label>
							<?php if(Q('get.n')==2): ?>
								<a href="{{U('Orders/index')}}" class="m-add-dy"><span>合并支付</span></a>
							<?php endif ?>
						</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		
		<div class="hr-60"></div>
<!------------------------------底部-------------------------->
		{{include file="VIEW_PATH/Common/footer.php"}}
	</body>
</html>
